package com.example.demo.domin.entity;

import lombok.Builder;
import lombok.Data;
import lombok.Generated;
import org.springframework.http.codec.ServerSentEvent;
import reactor.core.publisher.Flux;

@Data
@Builder
public class Sickness {

    private String sicknessName;
    private double similarity;
    private Flux<ServerSentEvent<String>> executorName;//可执行方案
//
//    public Sickness(String sicknessName, double similarity) {
//        this.sicknessName = sicknessName;
//        this.similarity = similarity;
//    }
@Generated
public static SicknessBuilder builder() {
    return new SicknessBuilder();
}

    @Generated
    public String getSicknessName() {
        return this.sicknessName;
    }

    @Generated
    public double getSimilarity() {
        return this.similarity;
    }

    @Generated
    public Flux<ServerSentEvent<String>> getExecutorName() {
        return this.executorName;
    }

    @Generated
    public void setSicknessName(final String sicknessName) {
        this.sicknessName = sicknessName;
    }

    @Generated
    public void setSimilarity(final double similarity) {
        this.similarity = similarity;
    }

    @Generated
    public void setExecutorName(final Flux<ServerSentEvent<String>> executorName) {
        this.executorName = executorName;
    }

    @Generated
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof Sickness)) {
            return false;
        } else {
            Sickness other = (Sickness)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (Double.compare(this.getSimilarity(), other.getSimilarity()) != 0) {
                return false;
            } else {
                Object this$sicknessName = this.getSicknessName();
                Object other$sicknessName = other.getSicknessName();
                if (this$sicknessName == null) {
                    if (other$sicknessName != null) {
                        return false;
                    }
                } else if (!this$sicknessName.equals(other$sicknessName)) {
                    return false;
                }

                Object this$executorName = this.getExecutorName();
                Object other$executorName = other.getExecutorName();
                if (this$executorName == null) {
                    if (other$executorName != null) {
                        return false;
                    }
                } else if (!this$executorName.equals(other$executorName)) {
                    return false;
                }

                return true;
            }
        }
    }

    @Generated
    protected boolean canEqual(final Object other) {
        return other instanceof Sickness;
    }

    @Generated
    public int hashCode() {
//        int PRIME = true;
        int result = 1;
        long $similarity = Double.doubleToLongBits(this.getSimilarity());
        result = result * 59 + (int)($similarity >>> 32 ^ $similarity);
        Object $sicknessName = this.getSicknessName();
        result = result * 59 + ($sicknessName == null ? 43 : $sicknessName.hashCode());
        Object $executorName = this.getExecutorName();
        result = result * 59 + ($executorName == null ? 43 : $executorName.hashCode());
        return result;
    }

    @Generated
    public String toString() {
        String var10000 = this.getSicknessName();
        return "Sickness(sicknessName=" + var10000 + ", similarity=" + this.getSimilarity() + ", executorName=" + this.getExecutorName() + ")";
    }

    @Generated
    public Sickness(final String sicknessName, final double similarity, final Flux<ServerSentEvent<String>> executorName) {
        this.sicknessName = sicknessName;
        this.similarity = similarity;
        this.executorName = executorName;
    }

    @Generated
    public Sickness() {
    }

    @Generated
    public static class SicknessBuilder {
        @Generated
        private String sicknessName;
        @Generated
        private double similarity;
        @Generated
        private Flux<ServerSentEvent<String>> executorName;

        @Generated
        SicknessBuilder() {
        }

        @Generated
        public SicknessBuilder sicknessName(final String sicknessName) {
            this.sicknessName = sicknessName;
            return this;
        }

        @Generated
        public SicknessBuilder similarity(final double similarity) {
            this.similarity = similarity;
            return this;
        }

        @Generated
        public SicknessBuilder executorName(final Flux<ServerSentEvent<String>> executorName) {
            this.executorName = executorName;
            return this;
        }

        @Generated
        public Sickness build() {
            return new Sickness(this.sicknessName, this.similarity, this.executorName);
        }

        @Generated
        public String toString() {
            return "Sickness.SicknessBuilder(sicknessName=" + this.sicknessName + ", similarity=" + this.similarity + ", executorName=" + this.executorName + ")";
        }
}
}
